<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="JSURLUtil,ru.kozlovskij.JavaScript.utils.JSURLUtil,SERVER_NAME_TOKEN,SERVER_PORT_TOKEN,getFullURL,getLocationHashParamsAsObject,getLocationParamsAsObject,getPort,getProtocol,getServerName,getServerNameWithPort,getURLHashParamsAsObject,getURLParamsAsObject,isHttpURL,isHttpsURL,objectToString,replacePort,replaceProtocol,stringToObject,urisEqual,urlComponentToObject" name="keywords">
<title>ru.kozlovskij.JavaScript.utils.JSURLUtil</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'JSURLUtil - © Aleksandr Kozlovskij :: JSExperienceLib';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">JSE API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?ru/kozlovskij/JavaScript/utils/JSURLUtil.html&amp;ru/kozlovskij/JavaScript/utils/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;JSURLUtil</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class JSURLUtil"); titleBar_setSubNav(true,false,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">ru.kozlovskij.JavaScript.utils</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class JSURLUtil</td>
</tr>
</table>
<p></p>
<p></p>
<br>
<hr>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#JSURLUtil()">JSURLUtil</a>()</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getFullURL()">getFullURL</a>(rootURL:String, url:String):String</div>
<div class="summaryTableDescription">[static]
       Converts a potentially relative URL to a fully-qualified URL.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getLocationHashParamsAsObject()">getLocationHashParamsAsObject</a>(paramSeparator:String = "&amp;", nameValueSeparator:String = "="):Object</div>
<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getLocationParamsAsObject()">getLocationParamsAsObject</a>():Object</div>
<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getPort()">getPort</a>(url:String):uint</div>
<div class="summaryTableDescription">[static]
       Returns the port number from the specified URL.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getProtocol()">getProtocol</a>(url:String):String</div>
<div class="summaryTableDescription">[static]
       Returns the protocol section of the specified URL.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getServerName()">getServerName</a>(url:String):String</div>
<div class="summaryTableDescription">[static]
       Returns the server name from the specified URL.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getServerNameWithPort()">getServerNameWithPort</a>(url:String):String</div>
<div class="summaryTableDescription">[static]
      Returns the domain and port information from the specified URL.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getURLHashParamsAsObject()">getURLHashParamsAsObject</a>(url:String, paramSeparator:String = "&amp;", nameValueSeparator:String = "="):Object</div>
<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getURLParamsAsObject()">getURLParamsAsObject</a>(url:String):Object</div>
<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isHttpsURL()">isHttpsURL</a>(url:String):Boolean</div>
<div class="summaryTableDescription">[static]
       Determines if the URL uses the secure HTTPS protocol.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isHttpURL()">isHttpURL</a>(url:String):Boolean</div>
<div class="summaryTableDescription">[static]
       Determines if the URL uses the HTTP, HTTPS, or RTMP protocol.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#objectToString()">objectToString</a>(object:Object, separator:String = "", encodeURL:Boolean):String</div>
<div class="summaryTableDescription">[static]
       Enumerates an object's dynamic properties (by using a <code>for..in</code> loop)
       and returns a String.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#replacePort()">replacePort</a>(uri:String, newPort:uint):String</div>
<div class="summaryTableDescription">[static]
       Returns a new String with the port replaced with the specified port.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#replaceProtocol()">replaceProtocol</a>(uri:String, newProtocol:String):String</div>
<div class="summaryTableDescription">[static]
       Replaces the protocol of the
       specified URI with the given protocol.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#stringToObject()">stringToObject</a>(string:String, separator:String = "", decodeURL:Boolean):Object</div>
<div class="summaryTableDescription">[static]
       Returns an object from a String.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#urisEqual()">urisEqual</a>(uri1:String, uri2:String):Boolean</div>
<div class="summaryTableDescription">[static]
       Returns a new String with the port and server tokens replaced with
       the port and server from the currently running application.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#urlComponentToObject()">urlComponentToObject</a>(uc:String, paramSeparator:String = "&amp;", nameValueSeparator:String = "="):Object</div>
<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#SERVER_NAME_TOKEN">SERVER_NAME_TOKEN</a> : String = "{server.name}"<div class="summaryTableDescription">[static]
      If the <code>LoaderConfig.url</code> property is not available, the <code>replaceTokens()</code> method will not 
      replace the server name and port properties properly.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#SERVER_PORT_TOKEN">SERVER_PORT_TOKEN</a> : String = "{server.port}"<div class="summaryTableDescription">[static]
       The pattern in the String that is passed to the <code>replaceTokens()</code> method that 
       is replaced by the application's port.</div>
</td><td class="summaryTableOwnerCol">JSURLUtil</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="JSURLUtil()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">JSURLUtil</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function JSURLUtil()</code>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="getFullURL()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getFullURL</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public static function getFullURL(rootURL:String, url:String):String</code><p>
       Converts a potentially relative URL to a fully-qualified URL.
       If the URL is not relative, it is returned as is.
       If the URL starts with a slash, the host and port
       from the root URL are prepended.
       Otherwise, the host, port, and path are prepended.
             </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">rootURL</span>:String</code> &mdash; URL used to resolve the URL specified by the <code>url</code> parameter, if <code>url</code> is relative.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code> &mdash; URL to convert.
             </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; Fully-qualified URL.
      </td>
</tr>
</table>
</div>
<a name="getLocationHashParamsAsObject()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getLocationHashParamsAsObject</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function getLocationHashParamsAsObject(paramSeparator:String = "&amp;", nameValueSeparator:String = "="):Object</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">paramSeparator</span>:String</code> (default = "<code>&amp;</code>")<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">nameValueSeparator</span>:String</code> (default = "<code>=</code>")<code></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code></td>
</tr>
</table>
</div>
<a name="getLocationParamsAsObject()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getLocationParamsAsObject</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function getLocationParamsAsObject():Object</code>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code></td>
</tr>
</table>
</div>
<a name="getPort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getPort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function getPort(url:String):uint</code><p>
       Returns the port number from the specified URL.
       
       </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code> &mdash; The URL to analyze.
       </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>uint</code> &mdash; The port number of the specified URL.
      </td>
</tr>
</table>
</div>
<a name="getProtocol()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getProtocol</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function getProtocol(url:String):String</code><p>
       Returns the protocol section of the specified URL.
       The following examples show what is returned based on different URLs:
       
       <pre>
       getProtocol("https://localhost:2700/") returns "https"
       getProtocol("rtmp://www.myCompany.com/myMainDirectory/groupChatApp/HelpDesk") returns "rtmp"
       getProtocol("rtmpt:/sharedWhiteboardApp/June2002") returns "rtmpt"
       getProtocol("rtmp::1234/chatApp/room_name") returns "rtmp"
       </pre>
             </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code> &mdash; String containing the URL to parse.
             </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; The protocol or an empty String if no protocol is specified.
      </td>
</tr>
</table>
</div>
<a name="getServerName()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getServerName</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function getServerName(url:String):String</code><p>
       Returns the server name from the specified URL.
       
       </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code> &mdash; The URL to analyze.
       </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; The server name of the specified URL.
      </td>
</tr>
</table>
</div>
<a name="getServerNameWithPort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getServerNameWithPort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function getServerNameWithPort(url:String):String</code><p>
      Returns the domain and port information from the specified URL.
      
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code> &mdash; The URL to analyze.
      </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; The server name and port of the specified URL.
     </td>
</tr>
</table>
</div>
<a name="getURLHashParamsAsObject()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getURLHashParamsAsObject</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function getURLHashParamsAsObject(url:String, paramSeparator:String = "&amp;", nameValueSeparator:String = "="):Object</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">paramSeparator</span>:String</code> (default = "<code>&amp;</code>")<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">nameValueSeparator</span>:String</code> (default = "<code>=</code>")<code></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code></td>
</tr>
</table>
</div>
<a name="getURLParamsAsObject()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getURLParamsAsObject</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function getURLParamsAsObject(url:String):Object</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code></td>
</tr>
</table>
</div>
<a name="isHttpsURL()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isHttpsURL</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function isHttpsURL(url:String):Boolean</code><p>
       Determines if the URL uses the secure HTTPS protocol. 
             </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code> &mdash; The URL to analyze.
      
       </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if the URL starts with "https://".
      </td>
</tr>
</table>
</div>
<a name="isHttpURL()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isHttpURL</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function isHttpURL(url:String):Boolean</code><p>
       Determines if the URL uses the HTTP, HTTPS, or RTMP protocol. 
             </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">url</span>:String</code> &mdash; The URL to analyze.
      
       </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if the URL starts with "http://", "https://", or "rtmp://".
      </td>
</tr>
</table>
</div>
<a name="objectToString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">objectToString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function objectToString(object:Object, separator:String = "", encodeURL:Boolean):String</code><p>
       Enumerates an object's dynamic properties (by using a <code>for..in</code> loop)
       and returns a String. You typically use this method to convert an ActionScript object to a String that you then append to the end of a URL.
       By default, invalid URL characters are URL-encoded (converted to the <code>%XX</code> format).
             </p><p>For example:
       <pre>
       var o:Object = { name: "Alex", age: 21 };
       var s:String = URLUtil.objectToString(o,";",true);
       trace(s);
       </pre>
       Prints "name=Alex;age=21" to the trace log.
       </p>
       
       <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">object</span>:Object</code> &mdash; The object to convert to a String.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">separator</span>:String</code> (default = "<code></code>")<code></code> &mdash; The character that separates each of the object's <code>property:value</code> pair in the String.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">encodeURL</span>:Boolean</code> &mdash; Whether or not to URL-encode the String.
       
       </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; The object that was passed to the method.
      </td>
</tr>
</table>
</div>
<a name="replacePort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">replacePort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function replacePort(uri:String, newPort:uint):String</code><p>
       Returns a new String with the port replaced with the specified port.
       If there is no port in the specified URI, the port is inserted.
       This method expects that a protocol has been specified within the URI.
             </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">uri</span>:String</code> &mdash; String containing the URI in which the port is replaced.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">newPort</span>:uint</code> &mdash; uint containing the new port to subsitute.
             </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; The URI with the new port.
      </td>
</tr>
</table>
</div>
<a name="replaceProtocol()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">replaceProtocol</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function replaceProtocol(uri:String, newProtocol:String):String</code><p>
       Replaces the protocol of the
       specified URI with the given protocol.
             </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">uri</span>:String</code> &mdash; String containing the URI in which the protocol
       needs to be replaced.
             </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">newProtocol</span>:String</code> &mdash; String containing the new protocol to use.
             </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; The URI with the protocol replaced,
       or an empty String if the URI does not contain a protocol.
      </td>
</tr>
</table>
</div>
<a name="stringToObject()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stringToObject</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function stringToObject(string:String, separator:String = "", decodeURL:Boolean):Object</code><p>
       Returns an object from a String. The String contains <code>name=value</code> pairs, which become dynamic properties
       of the returned object. These property pairs are separated by the specified <code>separator</code>.
       This method converts Numbers and Booleans, Arrays (defined by "[]"), 
       and sub-objects (defined by "{}"). By default, URL patterns of the format <code>%XX</code> are converted
       to the appropriate String character.
             </p><p>For example:
       <pre>
       var s:String = "name=Alex;age=21";
       var o:Object = URLUtil.stringToObject(s, ";", true);
       </pre>
       
       Returns the object: <code>{ name: "Alex", age: 21 }</code>.
       </p>
       
       <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">string</span>:String</code> &mdash; The String to convert to an object.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">separator</span>:String</code> (default = "<code></code>")<code></code> &mdash; The character that separates <code>name=value</code> pairs in the String.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">decodeURL</span>:Boolean</code> &mdash; Whether or not to decode URL-encoded characters in the String.
      
       </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code> &mdash; The object containing properties and values extracted from the String passed to this method.
      </td>
</tr>
</table>
</div>
<a name="urisEqual()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">urisEqual</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function urisEqual(uri1:String, uri2:String):Boolean</code><p>
       Returns a new String with the port and server tokens replaced with
       the port and server from the currently running application.
             </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">uri1</span>:String</code> &mdash; String containing the <code>SERVER_NAME_TOKEN</code> and/or <code>SERVER_NAME_PORT</code>
       which should be replaced by the port and server from the application.
             </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">uri2</span>:String</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; The URI with the port and server replaced.
      </td>
</tr>
</table>
</div>
<a name="urlComponentToObject()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">urlComponentToObject</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function urlComponentToObject(uc:String, paramSeparator:String = "&amp;", nameValueSeparator:String = "="):Object</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">uc</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">paramSeparator</span>:String</code> (default = "<code>&amp;</code>")<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">nameValueSeparator</span>:String</code> (default = "<code>=</code>")<code></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code></td>
</tr>
</table>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="SERVER_NAME_TOKEN"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">SERVER_NAME_TOKEN</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const SERVER_NAME_TOKEN:String = "{server.name}"</code><p>
      If the <code>LoaderConfig.url</code> property is not available, the <code>replaceTokens()</code> method will not 
      replace the server name and port properties properly.
      
      </p></div>
<a name="SERVER_PORT_TOKEN"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">SERVER_PORT_TOKEN</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const SERVER_PORT_TOKEN:String = "{server.port}"</code><p>
       The pattern in the String that is passed to the <code>replaceTokens()</code> method that 
       is replaced by the application's port.
      </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<div class="feedbackLink">
<center>
<a href="mailto:Aleksandr@Kozlovskij.ru?subject=ASLR Feedback(%D0%A1%D1%80 %D1%81%D0%B5%D0%BD 10 2008, 1:17 PM GMT+04:00) : ru.kozlovskij.JavaScript.utils.JSURLUtil">Submit Feedback to Aleksandr Kozlovskij</a>
</center>
</div>
<center class="copyright">
</center>
</div>
</body>
</html>
<!---->
